import request from '@/utils/request'

export function getOptions(query) {
  return request({
    url: '/knowledge/option/getList',
    method: 'post',
    data: query
  })
}

export function getOption(id) {
  return request({
    url: '/knowledge/option/getDetail',
    method: 'post',
    data: id
  })
}
export function changeStatusByOptionID(id) {
  return request({
    url: '/knowledge/option/change-status',
    method: 'post',
    data: id
  })
}

export function saveOption(formdata) {
  return request({
    url: '/knowledge/option/save',
    method: 'post',
    data: formdata
  })
}

export function deleteOptionByID(id) {
  return request({
    url: '/knowledge/option/delete',
    method: 'post',
    data: id
  })
}
export function removeOptionByID(id) {
  return request({
    url: '/knowledge/option/remove',
    method: 'post',
    data: id
  })
}

export function fetchOptionAvabile() {
  return request({
    url: '/knowledge/option/getAvailable',
    method: 'post'
  })
}
